package com.xzy.springcloud.service;

import com.xzy.springcloud.pojo.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
//feign调用接口，contoller直接调用此处接口，接口由feign实现（自动进行rpc调用）
//@FeignClient(name = "CLOUD-PAYMENT-SERVICE")
@FeignClient(name = "CLOUD-GATEWAY") //配置feign走网关
@Component
public interface IFeignService {
    @GetMapping("/payment/get/{id}")
     CommonResult getbyId(@PathVariable("id") Long id);
}
